<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加角色</title>
	<%@ include file="/app/includes/header.jsp"%>
	<script type="text/javascript">
		function addDict(){
			$('#dictForm').submit();
		}
		$(function(){
				$('#test1').combobox({
				url:'<%=request.getContextPath()%>/system/dict/getDictByType.action?type=2',
				valueField:'id',
				textField:'text'
			});
		
				$('#test2').combobox({
				url:'<%=request.getContextPath()%>/system/dict/getDictByType.action?type=type',
				valueField:'id',
				textField:'text',
				onSelect:function(record){
	                $('#test3').combobox({
	                    url:'<%=request.getContextPath()%>/system/dict/getDictByType.action?type='+record.id,
	                    valueField:'id',
	                    textField:'text'
	                }).combobox('clear');
	            }
			});	
		
				$('#test3').combobox({
				url:'<%=request.getContextPath()%>/system/dict/getDictByType.action?type=1',
				valueField:'id',
				textField:'text',
				onSelect:function(record){
	                $('#test4').combobox({
	                    url:'<%=request.getContextPath()%>/system/dict/getDictByType.action?type='+record.id,
	                    valueField:'id',
	                    textField:'text'
	                }).combobox('clear');
	            }
			});	
		})
	</script>
</head>
<body>
	<div id="panel" class="easyui-panel" title="添加数据字典信息"
		icon="icon-save" collapsible="true" style="padding: 10px;">
		<form id="dictForm" action="<%=request.getContextPath()%>/system/dict/addDictTest.action" method="post">
			<table class="table_form">
			<tr>
				<td>
					标识:
				</td>
				<td>
					<input id="id" name="id"  type="text"></input>
				</td>
				<td colspan="2">
					<div id="idTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					部门:
				</td>
				<td>
					<select id="test1" class="easyui-combobox" name="test1" style="width:200px;" required="true"></select>
				</td>
				<td colspan="2">
<!--					<div id="valuetip"></div>-->
				</td>
			</tr>
			<tr>
				<td>
					人力资源:
				</td>
				<td>
					<select id="test2" class="easyui-combobox" name="test2" style="width:200px;" required="true"></select>
				</td>
				<td>
					<select id="test3" class="easyui-combobox" name="test3" style="width:200px;" required="true"></select>
				</td>
				<td>
					<select id="test4" class="easyui-combobox" name="test4" style="width:200px;" required="true"></select>
				</td>
			</tr>
<!--			<tr>-->
<!--				<td>-->
<!--					类型:-->
<!--				</td>-->
<!--				<td>-->
<!--					<input id="type" name="type" type="text"></input>-->
<!--				</td>-->
<!--				<td>-->
<!--					<div id="typetip" ></div>-->
<!--				</td>-->
<!--			</tr>-->
			<tr>
				<td colspan="4">
					<div style="padding: 10px;" >
						<a href="#" onclick="addDict()" class="easyui-linkbutton" 
							iconCls="icon-add">添加</a>
						<a href="javascript:history.back(-1)" class="easyui-linkbutton"  
							iconCls="icon-cancel">取消</a>
					</div>
				</td>
			</tr>
			</table>
		</form>
	</div>
</body>
	
</html>






